Storage apparatus and cache control method

ABSTRACT

The object of the present invention is to provide a storage apparatus capable of optimizing the cache-resident area in a case where cache residence control in units of LUs is employed to a storage apparatus that virtualizes the capacity by acquiring only a cache area of a size that is the same as the physical capacity assigned to the LU. In the storage apparatus, in a case where an LU that is a logical space resident in the cache memory is configured by a set of pages acquired by dividing a pool volume as a physical space created by using a plurality of storage devices in a predetermined size, when the LU to be resident in the cache memory is created, a capacity corresponding to the size of the LU is not initially acquired in the cache memory, a cache capacity that is the same as the physical capacity allocated to a new page is acquired in the cache memory each time when the page is newly allocated, and the new page is resident in the cache memory.

CROSS REFERENCES TO RELATED APPLICATIONS

This application relates to and claims priority from Japanese Patent Application No. 2008-271508, filed on Oct. 22, 2008, the entire disclosure of which is incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a storage apparatus that virtualizes the capacity, and more particularly, to technology that can be effectively applied to a cache control method in the storage apparatus.

2. Description of the Related Art

Generally, storage apparatuses that are configured by a plurality of disks use a RAID (Redundant Arrays of Independent Disks) configuration in which data is distributed and maintained over a plurality of disks for providing users a data storage space that has high capacity and high reliability and allows high-speed access.

When a storage apparatus is introduced, design of capacity, in which the capacity of a local unit (LU) needed in the future is predicted in advance by a supervisor of the storage based on the operated form, is needed for creating the LU that is a storage space of user data. However, when the LU having an excessive size is allocated, there are problems such as low use efficiency of the physical capacity and an increase of TCO due to excessive investment.

Thus, as a technique for solving the above-described problems, a technique for providing a virtual LU space having an unlimited capacity for a host computer with only a minimal physical area adjusted to the access range of the LU used has been proposed (for example, JP-A-2003-15915). The above-described technique has an aspect that a physical area is not allocated at a time when the LU is created but a physical area is dynamically allocated from a group of disks to a part of the LU that is accessed each time the part is accessed.

In general storage apparatuses, a hard disk having a low-speed and high capacity is frequently used. Thus, in order to increase the speed of I/O processes, a cache memory (hereinafter, simply referred to as a cache) having a high speed and low capacity is loaded in the general storage apparatuses. However, since a cache memory area is much smaller than a disk area, it is difficult to continuously maintain specific data in the cache memory. Thus, a technique (hereinafter, referred to as cache residence) for implementing a high-speed process by intentionally having a specific program or specific data to be resident in the cache memory has been proposed (for example, JP-A-2005-309739).

In addition, although not written in JP-A-2005-309739, there is a technique for having data of all the specific LUs to be resident in the cache memory.

SUMMARY OF THE INVENTION

However, in the above-described storage apparatuses, when cache residence control is employed, data that is a residence target occupies a cache memory area that is needed for residence, and accordingly, a cache memory area that can be used by non-resident data is decreased. As a result, the speed of the I/O processes for the non cache-resident data is lowered.

Here, a case where the above-described LU cache residence control is applied to a storage apparatus that virtualizes the capacity will be considered. In the case, in the general residence method, in order to have all the data of the logical address space to be resident in the cache memory, an area corresponding to the total size of the virtualized LUs is needed to be acquired in the cache memory. In such a case, the cache area is acquired also for a part for which an I/O request is not generated and a physical area is not allocated, and accordingly, the cache area is unnecessarily occupied. Therefore, the use efficiency of the cache is lowered.

The object of the present invention is to provide a storage apparatus capable of optimizing the cache-resident area in a case where cache residence control in units of LUs is employed to a storage apparatus that virtualizes the capacity by acquiring only a cache area of a size that is the same as the physical capacity assigned to the LU. As a result, the cache area that can be used for non cache-resident data is increased, and the speed of the I/O processes for the non cache-resident data is improved, and accordingly, the system performance is maximized.

The above-described and other objects of the present invention and new aspects thereof will become apparent by referring to descriptions below and attached drawings.

Overviews of major embodiments of the invention disclosed here will be briefly described as below.

According to the overviews of the major embodiments, the above-described problems are solved by having only data corresponding to the amount of physical capacity assigned to the LU to be resident in the cache memory. In other words, a control method in which a segment area having a same size as that of assignment is acquired in the cache memory as a resident area each time when a physical capacity is newly allocated to the LU to be resident is used. In particular, in a case where an LU that is a logical space resident in the cache memory is configured by a set of pages acquired by dividing a pool volume as a physical space created by using a plurality of storage devices in a predetermined size, when the LU to be resident in the cache memory is created, a capacity corresponding to the size of the LU is not initially acquired in the cache memory, a cache capacity that is the same as the physical capacity allocated to a new page is acquired in the cache memory each time when the page is newly allocated, and the new page is resident in the cache memory.

In addition, for creating the resident LU, a control method in which the total size of the resident LUs is assured not to exceed the usable cache capacity is used. In particular, the allocation size of the LU desired to be resident and the allocatable cache size of the cache memory are compared with each other. When the allocation size of the LU is smaller than the allocable cache size, it is determined that the LU can be created. On the other hand, when the allocation size of the LU is larger than the allocatable cache size, it is determined that the LU cannot be created.

In addition, when the resident LU is deleted, a control method in which an LU that is not included in the residence target can use a cache open area by immediately opening the cache area acquired for residence is used. In particular, whether deletion of the resident LU or release of residence designation is determined. When deletion of the resident LU is determined, the page to be deleted is changed to be in the unassigned state, then, the entry of the target LU is deleted, and then, the resident area is open by changing the segment that maintains the data of the LU to be in the unused state. On the other hand, when release of the residence designation is determined, the data of the cache memory is reflected on the storage device by performing a data de-staging process for the data that has been restrained due to residence, then, the segment that maintains the data of the LU is changed to release of the residence designation, and information on the LU is deleted.

The advantages acquired from the major embodiments of the invention disclosed here will now be briefly described as below.

According to the advantages acquired from the major embodiments of the invention, unnecessary occupation of the cache for a case where the LU cache residence is performed in a storage apparatus that virtualizes the capacity can be suppressed. Accordingly, the use efficiency of the cache of the entire system is improved, and thereby a storage apparatus that maximizes the system performance can be implemented.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram representing the whole configuration of a storage apparatus according to an embodiment of the present invention.

FIG. 2 is an explanatory diagram representing an overview of the configuration of an LU of the storage apparatus represented in FIG. 1.

FIG. 3 is a diagram representing the configuration of a memory of the storage apparatus represented in FIG. 1.

FIG. 4 is a diagram representing the configuration of a pool volume management table of the storage apparatus represented in FIG. 1.

FIG. 5 is a diagram representing the configuration of an address conversion table of the storage apparatus represented in FIG. 1.

FIG. 6 is a diagram representing the configuration of a resident LU management table of the storage apparatus represented in FIG. 1.

FIG. 7 is a diagram showing the configuration of a cache segment management table of the storage apparatus represented in FIG. 1.

FIG. 8 is a diagram representing the configuration of a cache capacity management table of the storage apparatus represented in FIG. 1.

FIG. 9 is a flowchart representing the sequence of creation of a resident LU in the storage apparatus represented in FIG. 1.

FIG. 10 is a flowchart representing the sequence of processing an I/O request transmitted from a host computer in the storage apparatus represented in FIG. 1.

FIG. 11 is a flowchart representing a detailed sequence of an I/O process performed by the storage apparatus represented in FIG. 1.

FIG. 12 is a flowchart representing a detailed sequence of a new-page allocating process in the storage apparatus represented in FIG. 1.

FIG. 13 is a flowchart representing a detailed sequence of a cache-residence process in the storage apparatus represented in FIG. 1.

FIG. 14 is a flowchart representing a detailed sequence of a data transfer process in the storage apparatus represented in FIG. 1.

FIG. 15 is a flowchart representing the sequence for deleting a resident LU or releasing designation of residence in the storage apparatus represented in FIG. 1.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENT

Hereinafter, an embodiment of the present invention will be described in detail with reference to drawings. In all the drawings used for describing the embodiment, basically, a same reference sign is assigned to a same member, and a duplicate description thereof is omitted.

Configuration of Storage Apparatus

FIG. 1 is a diagram representing the whole configuration of a storage apparatus according to an embodiment of the present invention.

As shown in FIG. 1, the storage apparatus 10 is configured by a storage control device 100 that controls the overall operation of the storage apparatus and a storage drive device 200 that provides a storage area.

To the storage apparatus 10, a host computer 300 such as an application server that becomes an upper apparatus using the storage apparatus 10 is connected through a host adaptor 110 of the storage control device 100. As an interface for connecting the storage apparatus 10 and the host computer 300, a SAN (Storage Area Network) 180 that is a dedicated network is used. For the configuration of the SAN 180, a fiber channel, an SCSI (Small Computer System Interface), an iSCSI (internet Small Computer System Interface), a USB (Universal Serial Bus), an IEEE1394 bus, or the like may be used. In addition, there may be a plurality of the host computers 300 that are connected to the storage apparatus 10.

In addition, in the host computer 300, a control software program that manipulates or sets the disk configuration of the storage apparatus 10 and controls the operation of the storage apparatus 10 is installed. The operation of the storage apparatus 10 can be controlled by issuing a command or the like to the storage apparatus 10 by using the control software program installed in the host computer 300. Here, the storage control software program in the storage apparatus 10 and the host computer 300 transfer data therebetween through a LAN (Local Area Network) 190. A computer that manages and controls the storage apparatus 10 may be different from the host computer 300.

The storage control device 100 is configured by the host adaptor 110 that connects the storage control device 100 to the host computer 300 using the storage apparatus 10, a central processing unit (CPU) 120 that performs overall control of the storage apparatus 10, a memory 130 in which a program and data needed for the CPU 120 to control the storage apparatus 10 are stored, a cache memory 140 for user data that provides a high-speed response by having an LU for data access of the host computer 300 to be resident, ASICs (application specific integrated circuits) 150 that calculate parities for configuring an RAID and the like, a disk adaptor 160 that connects the storage control device 100 and the storage drive device 200, and an NIC (Network Interface Card) 170 that is connected to the host computer 300 through the LAN 190.

The storage drive device 200 includes a plurality of disk boxes 210. In the disk box 210, a plurality of physical disks (storage devices) 2100 are included. As the physical disk 2100, a hard disk or the like may be used.

<Configuration of LU>

FIG. 2 is an explanatory diagram representing an overview of the configuration of an LU.

In this embodiment, by using the plurality of physical disks 2100 that is included in the storage drive device 200, a pool volume that is a physical space having a specific RAID level is created. Then, a physical capacity needed for building an LU as a logical space is assigned from the pool volume. The pool volume is divided into a plurality of blocks (hereinafter, referred to as pages 2101) having a predetermined size. The LU is configured by a set of the pages 2101 in the pool volume. One page 2101 may be created over a plurality of the physical disks 2100.

In FIG. 2, LUN0 (the number of the LU is “0”) represents an LU having the capacity of five pages. In the figure, to areas of three pages including page No. 10 (21010) of LBA (Logical Block Address)=0 to LBA=999, page No. 3 (21011) of LBA=1000 to LBA=1999, and page No. 62 (21012) of LBA=2000 to LBA=2999, assignment of physical capacities are completed. On the other hand, areas of two pages including a page (21013) of LBA=3000 to LBA=3999 and a page (21014) of LBA=4000 to LBA=4999 are in the state (N/A) in which any physical capacity is not assigned thereto. Thus, while the host computer 300 recognizes LUN0 as the area of LBA=0 to LBA=4999, the storage device 10 is in the state in which physical capacities are assigned only to the areas of LBA=0 to LBA=2999 to which actual access is made. Here, when access to each area of LBA=3000 to LBA=3999 or LBA=4000 to LBA=4999 as an area to which any physical capacity is not assigned is made, a new page is assigned to the LU by acquiring the new page from the pool volume.

<Configuration of Memory>

FIG. 3 is a diagram representing the configuration of the memory 130.

In the memory 130, a program 1300 that is used by the CPU 120 for controlling the storage apparatus 10, a pool volume management table 1310 that is used for managing the physical capacity, and an address conversion table 1320 that is used for managing correspondence between the pool volume as a physical space and the LU as a logical space, a resident LU management table 1330 that is used for managing a list of resident LUs and sizes of the LUs, a cache segment management table 1340 that is used for managing cache segments, and a cache capacity management table 1350 that is used for managing the cache capacity used by the resident LUs are stored. The tables 1310 to 1350 will be described later in detail with reference to FIGS. 4 to 8. In addition, in the program 1300, programs used for processes to be described with reference to FIGS. 9 to 15 are included.

<Configuration of Pool Volume Management Table>

FIG. 4 is a diagram representing the configuration of the pool volume management table 1310.

In the pool volume management table 1310, areas for a page No. 13100, an HDD No. 13101, a start address 13102, an end address 13103, and an assignment flag 13104 are included.

The page No. 13100 is an identifier of a page that is created in the pool volume, and a unique number is assigned thereto. The HDD No. 13101 is an identifier used for managing a hard disk (physical disk 2100) to which each page belongs. In FIG. 4, the hard disk number is denoted by “x-y”. Here, x is a number representing the position of a disk box 210, and y is a number representing the position of the hard disk (physical disk 2100) in the same disk box 210. The start address 13102 and the end address 13103 represent the start position and end position of each page. The assignment flag 13104 is a flag used for determining whether assignment of a page to the LU is completed. When the assignment flag is “1”, it represents completion of assignment of the page. On the other hand, when the assignment flag is “0”, it represents that the page is unassigned.

<Configuration of Address Conversion Table>

FIG. 5 is a diagram representing the configuration of the address conversion table 1320.

In the address conversion table 1320, areas for an LUN 13200, a start LBA 13201, an end LBA 13202, and a page No. 13203 are included.

The LUN 13200 is an identifier of the LU. The start LBA 13201 and the end LBA 13202 represent the start position and the end position of the logical address. The page No. 13203 is used for managing correspondence between a logical address and a physical address. In the page No. 13203, the page No. of a page that is assigned from the pool volume is stored. Here, in the page No. 13203 of an area to which any physical capacity is unassigned, “N/A” is stored.

<Configuration of Resident LU Management Table>

FIG. 6 is a diagram representing the configuration of the resident LU management table 1330.

In the resident LU management table 1330, areas for an LUN 13300 and an LU size 13301 are included.

The LUN 13300 is the LU number of an LU that is designated to be resident. The LU size 13301 is the size of an LU that is assigned to each resident LU. Although the LU size is represented in GB in FIG. 6, the unit is not limited thereto. Thus, as the LU size, a MB notation, a KB notation, or the number of blocks may be used.

<Configuration of Cache Segment Management Table>

FIG. 7 is a diagram showing the configuration of the cache segment management table 1340.

In the cache segment management table 1340, there are areas for a segment No. 13400, a LUN 13401, a page No. 13402, a start LBA 13403, an end LBA 13404, and a cache residence flag 13405.

The segment No. 13400 is an identifier of a cache segment. The LUN 13401 represents the LUN of data that is stored in each segment. The page No. 13402 manages correspondence between data stored in the segment and a page of the pool volume. The start LBA 13403 and the end LBA 13404 manage the position within a corresponding page in which data stored in each segment is stored. When the size of the cache segment and the page size are different from each other, it is needed to determine the position within the page in which the data is stored.

The cache residence flag 13405 is used for managing whether data stored in the segment is designated to be cache-resident. When the cache residence flag 13405 is “1”, it represents that the segment is a cache-residence target and the segment cannot be used for an LU that is not included in the residence target. On the other hand, when the cache residence flag 13405 is “0”, it represents that the segment is not a cache-residence target and an ordinary LU that is not included in the residence target can use the segment. In addition, for an unused segment, “N/A” representing “not in use” is respectively stored in the LUN 13401, the page No. 13402, the start LBA 13403, the end LBA 13404, and the cache residence flag 13405 for representing that the segment can be immediately used.

<Configuration of Cache Capacity Management Table>

FIG. 8 is a diagram representing the configuration of the cache capacity management table 1350.

In the cache capacity management table 1350, areas for a usable cache size 13500, a resident LU total size 13501, and an allocatable cache size 13502 are included.

The usable cache size 13500 is the capacity of the cache memory 140 loaded in the storage apparatus 10 which can be used for maintaining user data. The value of the usable cache size changes in accordance with an increase or decrease of the capacity of the cache memory that is loaded in the storage apparatus 10. The resident LU total size 13501 manages the total LU size of the resident LUs. In the resident LU total size 13501, a value acquired from summing the LU sizes 13301 that are constituent elements of the resident LU management table 1330 is stored. In the allocatable cache size 13502, a value acquired from subtracting the resident LU total size 13501 from the usable cache size 13500 is stored. Since an LU having a size exceeding the physical capacity of the cache memory 140 that is loaded in the storage apparatus 10 cannot be resident, the allocatable cache size is used as a criterion for determining excess of the capacity. Although each size is represented in GB in FIG. 8, any unit such as MB, KB, or the number of blocks may be used.

<Creation of Resident LU>

FIG. 9 is a flowchart representing the sequence of creation of the resident LU. The sequence of creation of the resident LU will be described with reference to FIG. 9. The central processing unit 120 executes the program 1300 that is stored in the memory 130 in the storage apparatus 10 for performing the sequence of creation of the resident LU.

A storage manager directs the storage apparatus 10 to create the resident LU by using the control software that is installed to the host computer 300 (not shown in FIG. 9). Then, the storage apparatus 10 receives the direction for creating the resident LU which is issued by the host computer 300 (Step S100) and determines whether the allocation size of the LU desired by the storage manager is smaller than the allocatable cache size by comparing the desired allocation size of the LU with the allocatable cache size 13502 (Step S101). When the desired size of the LU is smaller than the allocatable cache size (S101—Yes) as the result of comparison, it is determined that the LU can be created. Accordingly, a process of creating the LU described below is performed.

First, an entry of an LU to be created is added in the address conversion table 1320. In particular, an LU number is added in the LUN 13200, the number of pages needed for creating the LU is calculated by dividing the LU size by the size of one page, and the start LBA 13201 and the end LBA 13202 of each page are written. However, in this process, only the process of allocating the LU capacity is performed, and allocation of a page that is an actual physical area is not performed. Thus, all the page No. 13203 in the address conversion table become “N/A” (Step S102). Next, by writing the LU number and the LU size of each LU to be created in the LUN 13300 and the LU size 13301 included in the resident LU management table 1330, the resident LU management table 1330 is updated (Step S103). In addition, the resident LU total size 13501 and the allocatable cache size 13502 in the cache capacity management table 1350 are updated (Step S104). Finally, by transmitting a notice of completion of creation of the LU to the host computer 300, this process is completed (Step S105).

On the other hand, when it is determined that the LU size is larger than the allocatable cache size in Step S101 (S101—No), all the sizes of the resident LUs exceed the usable cache size. Accordingly, it is determined that the LU cannot be created. Thus, by transmitting a notice of incapability of creation of the LU to the host computer 300, this process is completed (Step S106).

<I/O Request Processing>

FIG. 10 is a flowchart representing the sequence of processing an I/O request transmitted from the host computer 300. The sequence of processing an I/O request issued to the storage apparatus 10 by the host computer 300 will be described with reference to FIG. 10. The central processing unit 120 executes the program 1300 stored in the memory 130 in the storage apparatus 10 for performing the sequence of the I/O request processing.

The host computer 300 issues an I/O request of read or write to the storage apparatus 10 (Step S200). Then, the storage apparatus 10 receives the I/O request from the host computer 300 and performs an I/O process (Step S201). The I/O process will be described later in detail with reference to FIG. 11. After completing the process of Step S201, the storage apparatus 10 issues a notice of completion of the I/O request to the host computer 300 for notifying completion of the requested I/O process (Step S202). Then, the host computer 300 receives the notice of completion from the storage apparatus 10 and completes the command (Step S203).

FIG. 11 is a flowchart representing a detailed sequence of Step S201 that is the I/O process performed by the storage apparatus 10.

The storage apparatus 10 analyzes the I/O request command and detects an LUN, a start LBA, and an end LBA to be processed (Step S300). Next, the storage apparatus determines whether assignment of a page to the target LBA has been completed based on information included in the address conversion table 1320 (Step S301). When the page No. 13203 corresponding to the target LBA is not N/A (S301—Yes) as the result of determination in Step S301, the storage apparatus determines the I/O request command as an I/O request for an area to which assignment of a page has been completed, and thus, the process proceeds to a data transfer process (Step S304). The data transfer process will be described later in detail with reference to FIG. 14.

On the other hand, when the page No. 13203 corresponding to the target LBA is N/A in Step S301 (S301—No), the I/O request is for an area to which a page is not assigned. Thus, allocation of a new page is determined to be needed, and the process proceeds to a new-page allocating process (Step S302). This new-page allocating process will be described later in detail with reference to FIG. 12. Thereafter, a cache-residence process for the newly allocated page is performed (Step S303). This cache-residence process will be described later in detail with reference to FIG. 13. Thereafter, the process proceeds to the data transfer process (Step S304).

FIG. 12 is a flowchart representing a detailed sequence of Step S302 that is the new-page allocating process.

First, it is detected whether there is any allocatable page, that is, there is any unassigned page in the pool volume, based on information of the allocation flag 13104 included in the pool volume management table 1310 (Step S400). When there is not any page of which allocation flag 13104 is “0” in Step S400 (S400—No), it is determined that there is not any allocatable page. Accordingly, in such a case, a request for expanding the pool volume is transmitted to the storage manager by using the software installed in the host computer 300 (Step S402). Then, the storage manager that has received the notice of the request for expanding the pool volume in Step S402 adds a new physical disk 2100 to the pool volume for performing expansion of the pool volume (Step S403). By performing the pool volume expanding process, the entry of the pool volume management table 1310 is expanded by the amount of the added disk. The values of all the allocation flags 13104 of pages belonging to the added disk are in the state of “0”s representing that the pages are not assigned. After completing the expansion process of Step S403, the process proceeds to Step S400 in which whether allocation of a new page is determined again.

On the other hand, when there is a page of which allocation flag 13104 is “0” in Step S400 (S400—Yes), it is determined that there is an allocatable page. Accordingly, in such a case, a process of allocating the page is performed (Step S401). In particular, the page No. 13203 included in the address conversion table 1320 is changed from N/A to the page No. of the allocated page, and the allocation flag 13104 corresponding to the page No. 13100 of the allocated page included in the pool volume management table 1310 is changed to “1”.

FIG. 13 is a flowchart representing a detailed sequence of Step S303 that is the cache-residence process.

First, whether the LU is a cache-residence target is determined based on information included in the resident LU management table 1330 (Step S500). When the LUN of the LU to be processed is written in the LUN 13300 included in the resident LU management table 1330 (S500—Yes), it is determined that the LU is a cache-residence target. Accordingly, in such a case, in order to have data of the page allocated in Step S302 to be resident in the cache memory 140, a segment area corresponding to the amount of the allocated page is acquired in the cache memory 140 (Step S501). In Step S501, the LUN 13401, the page No. 13402, the start LBA 13403, the end LBA 13404 corresponding to the segment No. 13400 of the acquired segment which are included in the cache segment management table 1340 are updated.

Next, the I/O type of the command is determined (Step S502). When the I/O type is determined to be a read command (S502—Read), in order to cache-hit data, a data copying (staging) process for reading out data of the physical disk 2100 to be in the cache memory 140 is performed (Step S503). When the I/O type is determined to be a write command in Step S502 (S502—Write), acquisition of the cache memory area that is used for writing data is completed in S501, and accordingly, no process is performed. Next, by setting “1” that representing the cache-residence target to the value of the cache residence flag 13405, the segment is changed to have a residence attribute (Step S504). By performing the above-described steps, acquisition of the cache area corresponding to the amount of the newly allocated physical area only is completed for the residence target LU.

On the other hand, when the LU is determined not to be a residence target (S500—No) as the result of determination performed in Step S500, the process ends.

FIG. 14 is a flowchart representing a detailed sequence of Step S304 that is the data transfer process.

As in Step S300, the I/O request command is analyzed, and the LUN, the start LBA, and the end LBA to be processed are detected (Step S600). Next, by analyzing the I/O type, it is determined whether the command is a read command or a write command (Step S601). When the command is determined to be a read command (S601—Read) as the result of determination, cache hit or cache miss is determined based on the information included in the cache segment management table 1340 (Step S602). When data to be processed is not included in the cache segment management table 1340 (S602—miss), cache-miss is determined, and accordingly, copying (staging) data into the cache memory 140 from the physical disk 2100 is performed (Step S603). Thereafter, the data staged on the cache memory 140 is transferred to the host computer 300 (Step S604), and the process ends. On the other hand, when cache hit is determined in Step S602 (S602—hit), the data to be processed that is included in the cache memory 140 is transferred to the host computer 300 (Step S604), and the process ends.

On the other hand, When the I/O type is determined to be a write command in Step S601 (S601—Write), cache hit or cache miss is determined based on the information included in the cache segment management table 1340 as in Step S602 (Step S605). When data to be processed is included in the cache segment management table 1340 (S605—hit), cache-hit is determined, and accordingly, data is overwritten into the segment (Step S606), and the process ends. On the other hand, when cache miss is determined in Step S605 (S605—miss), the data is written into a vacant segment of the cache memory 140 (Sep S607), and the process ends.

Here, the data written into the cache memory 140 is needed to be overwritten into the physical disk 2100. A general storage apparatus employs an asynchronous write process in which a completion response is transmitted to the host computer 300 at a time point when the data is stored in the cache memory 140 and thereafter the data is written into the physical disk 2100 at an arbitrary timing. In FIG. 14, although the flowchart represents the process until completion of cache write only, it is assumed that the disk write process is performed asynchronously. However, the write data that is a cache-residence target is not written into the physical disk 2100.

In addition, in Steps S602 and S605 in which cache hit or cache miss is determined, cache hit is determined for the LU that is a cache-residence target, naturally.

Deletion of Resident LU or Release of Residence Designation

FIG. 15 is a flowchart representing the sequence for deleting a resident LU or releasing designation of residence. The central processing unit 120 executes the program 1300 stored in the memory 130 in the storage apparatus 10 for performing the sequence for deleting a resident LU or releasing designation of residence.

Here, release of residence designation represents an operation in which the LU is not deleted and the cache-residence of the LU is released.

First, the storage manager directs the storage apparatus 10 to delete a resident LU or release of residence designation by using the control software that is installed in the host computer 300 (not written in FIG. 15). Then, the storage apparatus 10 receives a command for directing the release of residence which is issued by the host computer 300 (Step S700). Then, the storage apparatus determines whether the type of the command is for deletion of the resident LU or only release of residence designation (Step S701).

When the command is for deletion of the LU as the result of Step S701 (S701—LU deletion), the allocation flag 13104 of the page No. 13100 that is to be deleted from the pool volume management table 1310 is changed to “0” that represents that the page is not assigned based on the page No. 13203 used by the LU that is to be deleted based on the information included in the address conversion table 1320 (Step S702). Next, by deleting the LUN 13200, the start LBA 13201, the end LBA 13202, and the page No 13203 corresponding thereto from the address conversion table 1320, the entry of the target LU is deleted (Step S703).

Thereafter, the segment No. 13400 in which data of the LU is maintained in the cache segment management table 1340 is acquired based on the LUN 13401, and the resident area is open by storing N/A, which represents “not in use” in the LUN 13401, the page No. 13402, the start LBA 13403, the end LBA 13404, and the cache residence flag 13405 of the segment (Step S705). In addition, the information on the LU is deleted from the resident LU management table 1330 (Step S706), and the resident LU total size 13501 and the allocatable cache size 13502 included in the cache capacity management table 1350 are updated (Step S707). By performing the above-described process, the process for deleting the resident LU is completed, and finally, this process is completed by transmitting a notice of completion of the process to the host computer 300 (Step S708).

On the other hand, when the command is for releasing the residence designation (S701—residence release) as the result of determination in Step S701, a data de-staging (data writing from the cache to the disk) process for the data that has been restrained due to residence is performed, and the data of the cache memory 140 is reflected on the physical disc 2100 (Step S704). Thereafter, the tables are updated by performing the processes of Step S705 to Step S707. However, in the update process for the cache segment management table 1340 of Step S705, different from the operation for deleting the LU, only the cache residence flag 13405 of the segment No. 13400 is changed to “0” that indicates release of the residence designation, and the LUN 13401, the page No. 13402, the start LBA 13403, and the end LBA 13404 are not changed. The reason is that although the segment is gradually used by a non-resident LU after release of the residence designation, there is a possibility of cache hit before the segment is used by the non-resident LU. Finally, the process is completed by transmitting a notice of completion of the process to the host computer 300 (Step S708).

By performing the above-described process, the open area can be used by an LU that is not designated to be resident by immediately opening the occupied area acquired in the cache memory 140 simultaneously with the release process in releasing the residence designation.

Advantages of This Embodiment

(1) When an LU to be resident in the cache memory 140 is created, the capacity corresponding to the amount of the LU size is not initially acquired in the cache memory 140, and acquisition of the capacity is determined each time when the physical capacity is newly allocated to the LU to be resident. Accordingly, a segment area having the same size as the amount of allocation can be acquired in the cache memory 140 as a resident area.

(2) When the resident LU is created, residence is determined by comparing the allocation size of an LU desired to be resident and the allocatable cache size in the cache memory 140. Accordingly, it can be assured that the resident LU total size does not exceed the usable cache capacity.

(3) When a resident LU is deleted, an LU that is not included in the residence target can use a cache open area by deleting the entry of the LU to be deleted and immediately opening the cache area acquired for residence. In addition, when the residence designation is released, information on the LU is deleted by performing a data de-staging process for the data that has been restrained due to residence, and accordingly, the residence designation can be released.

(4) When cache residence of an LU is performed, unnecessary acquisition of a resident cache area can be suppressed. Accordingly, the cache area that can be used for data that is not cache-resident is increased, and the speed of the I/O process for data that is not cache-resident is improved, and thereby the system performance is maximized. Therefore, the use efficiency of cache of the entire storage apparatus is improved, and improvement of performance of the entire storage apparatus can be implemented.

As above, the invention contrived by the inventors has been described in detail based on the embodiment. However, the invention is not limited to the above-described embodiment, and it is apparent that the invention may be changed in various manners without departing from the gist of the invention. 

1. A storage apparatus comprising: a storage control device; and a storage drive device that is connected to the storage control device, wherein the storage control device includes: a central processing unit that performs overall control of the storage apparatus; a memory that stores a program or data needed by the central processing unit for controlling the storage apparatus; and a cache memory that is used for having an LU, which is a logical space for data access of a host computer using the storage apparatus, to be resident, wherein the storage drive device includes a plurality of storage devices, wherein the LU that is resident in the cache memory is configured by a set of pages acquired by dividing a pool volume as a physical space created by using the plurality of storage devices in a predetermined size, and wherein, in the memory, a program that is executed by the central processing unit and is used for a cache-residence process in which, when the LU to be resident in the cache memory is created, a capacity corresponding to the size of the LU is not initially acquired in the cache memory, a cache capacity that is the same as the physical capacity allocated to a new page is acquired in the cache memory each time when the page is newly allocated, and the new page is resident in the cache memory is stored.
 2. The storage apparatus according to claim 1, wherein the cache-residence process is included in an I/O process in which an I/O request issued by the host computer is processed, wherein, in the memory, a program that is executed by the central processing unit and used for the I/O process and an address conversion table that is used for managing correspondence between the pool volume and the LU are stored, wherein, in the I/O process, the I/O request issued from the host computer is received, a command of the I/O request is analyzed, and whether allocation of the page to an LBA of the LU to be processed is completed is determined based on information included in the address conversion table, wherein, when the allocation is determined to be completed as the result of determination, the I/O request is determined to be a request for an area in which allocation of the page is completed, and a data transfer process is performed, and wherein, when the allocation is determined not to be completed, the I/O request is a request for an area in which the page is not allocated, allocation of a new page is determined to be needed, the process proceeds to a new page allocating process, and then, after the cache-residence process is performed for the newly allocated page, the data transfer process is performed.
 3. The storage apparatus according to claim 2, wherein a pool volume management table used for managing the pool volume is stored in the memory, wherein, in the new page allocating process, whether there is an allocatable page is determined based on information of an allocation flag included in the pool volume management table, wherein, when it is determined that there is not the allocatable page as the result of determination, a request for expanding the pool volume is notified to a storage manager for performing expansion of the pool volume, and wherein, when it is determined that there is the allocatable page, the page allocating process for the page is performed, the page included in the address conversion table is changed from an unassigned page to an assigned page, and the allocation flag corresponding to the allocated page which is included in the pool volume management table is changed to completion of allocation.
 4. The storage apparatus according to claim 2, wherein a resident LU management table that is used for managing a list and the size of the LU resident in the cache memory and a cache segment management table that is used for managing a segment of the cache memory are stored in the memory, and wherein, in the cache-residence process, it is determined whether the LU to be processed is a cache-residence target based on information included in the resident LU management table, a segment area corresponding to the allocated page is acquired in the cache memory and information included in the cache segment management table corresponding to the acquired segment is updated in a case where the LU is determined to be a cache-residence target as the result of determination, then, the I/O type of the command is determined, a date staging process for reading out data in the storage device to be in the cache memory is performed in a case where the I/O type is a read command as the result of determination, any additional process is not performed in a case where the I/O type is a write command, and then, the segment is changed to have a residence attribute by setting the cache residence flag included in the cache segment management table to the cache-residence target.
 5. The storage apparatus according to claim 1, wherein a program that is executed by the central processing unit and is used for a resident LU creating process, in which the resident LU is created, is stored in the memory, wherein, in the resident LU creating process, a direction for creating the resident LU which is issued by the host computer is received and the allocation size of the LU desired to be resident and the allocatable cache size of the cache memory are compared with each other, wherein, when the allocation size of the LU is determined to be smaller than the allocable cache size as the result of comparison, it is determined that the LU can be created, and a process for creating the LU is performed, and wherein, when the allocation size of the LU is determined to be larger than the allocatable cache size, it is determined that the LU cannot be created.
 6. The storage apparatus according to claim 1, wherein a program that is executed by the central processing unit and is used for a resident LU deleting process in which the resident LU is deleted and a residence designation releasing process in which the residence designation is released is stored, wherein, in the resident LU deleting process and the residence designation releasing process, a command for directing to release residence which is issued from the host computer is received, and whether the type of the command is deletion of the resident LU or release of residence designation is determined, wherein, when the type is deletion of the resident LU as the result of determination, the resident LU deleting process in which the page to be deleted is changed to be in the unassigned state, then, the entry of the target LU is deleted, and then, the resident area is open by changing the segment that maintains the data of the LU to be in the unused state is performed, and wherein, when the type is release of the residence designation, the residence designation releasing process in which the data of the cache memory is reflected on the storage device by performing a data de-staging process for the data that has been restrained due to residence, then, the segment that maintains the data of the LU is changed to release of the residence designation, and information on the LU is deleted is performed.
 7. A cache control method in a storage apparatus having a storage control device and a storage drive device that is connected to the storage control device, wherein the storage control device includes: a central processing unit that performs overall control of the storage apparatus; a memory that stores a program or data needed by the central processing unit for controlling the storage apparatus; and a cache memory that is used for having an LU, which is a logical space for data access of a host computer using the storage apparatus, to be resident, wherein the storage drive device includes a plurality of storage devices, wherein the LU that is resident in the cache memory is configured by a set of pages acquired by dividing a pool volume as a physical space created by using the plurality of storage devices in a predetermined size, and wherein, when the central processing unit executes the program stored in the memory and creates the LU to be resident in the cache memory, a cache-residence process in which a capacity corresponding to the size of the LU is not initially acquired in the cache memory, a cache capacity that is the same as the physical capacity allocated to a new page is acquired in the cache memory each time when the page is newly allocated, and the new page is resident in the cache memory is performed.
 8. The cache control method according to claim 7, wherein the cache-residence process is included in an I/O process in which an I/O request issued by the host computer is processed, wherein, in the I/O process, the I/O request issued from the host computer is received, a command of the I/O request is analyzed, and whether allocation of the page to an LBA of the LU to be processed is completed is determined based on information included in an address conversion table that is used for managing correspondence between the pool volume and the LU, wherein, when the allocation is determined to be completed as the result of determination, the I/O request is determined to be a request for an area in which allocation of the page is completed, and a data transfer process is performed, and wherein, when the allocation is determined not to be completed, the I/O request is a request for an area in which the page is not allocated, allocation of a new page is determined to be needed, the process proceeds to a new page allocating process, and then, after the cache-residence process is performed for the newly allocated page, the data transfer process is performed.
 9. The cache control method according to claim 8, wherein, in the new page allocating process, whether there is an allocatable page is determined based on information of an allocation flag included in a pool volume management table that is used for managing the pool volume, wherein, when it is determined that there is not the allocatable page as the result of determination, a request for expanding the pool volume is notified to a storage manager for performing expansion of the pool volume, and wherein, when it is determined that there is the allocatable page, the page allocating process for the page is performed, the page included in the address conversion table is changed from an unassigned page to an assigned page, and the allocation flag corresponding to the allocated page which is included in the pool volume management table is changed to completion of allocation.
 10. The cache control method according to claim 8, wherein, in the cache-residence process, it is determined whether the LU to be processed is a cache-residence target based on information included in a resident LU management table that is used for managing a list and the size of the LU resident in the cache memory, a segment area corresponding to the allocated page is acquired in the cache memory and information included in a cache segment management table, which is used for managing the segment of the cache memory, corresponding to the acquired segment is updated in a case where the LU is determined to be a cache-residence target as the result of determination, then, the I/O type of the command is determined, a date staging process for reading out data in the storage device to be in the cache memory is performed in a case where the I/O type is a read command as the result of determination, any additional process is not performed in a case where the I/O type is a write command, and then, the segment is changed to have a residence attribute by setting the cache residence flag included in the cache segment management table to the cache-residence target.
 11. The cache control method according to claim 7, wherein, the central processing unit executes the program that is stored in the memory, receives a direction for creating the resident LU which is issued by the host computer, and compares the allocation size of the LU desired to be resident with the allocatable cache size of the cache memory, wherein, when the allocation size of the LU is determined to be smaller than the allocable cache size as the result of comparison, it is determined that the LU can be created, and a process for creating the LU is performed, and wherein, when the allocation size of the LU is determined to be larger than the allocatable cache size, it is determined that the LU cannot be created.
 12. The cache control method according to claim 11, wherein, in the resident LU creating process, an LU number of the LU that is written in an address conversion table used for managing correspondence between the pool volume and the LU is added, the number of pages needed for creating the LU is calculated, the address conversion table is updated by writing a start LBA and an end LBA, then, a resident LU management table is updated by writing the LU number and the LU size of the LU written in the resident LU management table used for managing the list and the size of the LU resident in the cache memory, and then, a resident LU total size and the allocatable cache size included in a cache capacity management table used for managing the cache capacity used by the resident LU are updated.
 13. The cache control method according to claim 7, wherein the central processing unit executes the program that is stored in the memory, receives a command for directing to release residence which is issued from the host computer, and determines whether the type of the command is deletion of the resident LU or release of residence designation, wherein, when the type is deletion of the resident LU, the resident LU deleting process in which the page to be deleted is changed to be in the unassigned state, then, the entry of the target LU is deleted, and then, the resident area is open by changing the segment that maintains the data of the LU to be in the unused state is performed, and wherein, when the type is release of the residence designation, the residence designation releasing process in which the data of the cache memory is reflected on the storage device by performing a data de-staging process for the data that has been restrained due to residence, then, the segment that maintains the data of the LU is changed to release of the residence designation, and information on the LU is deleted is performed.
 14. The cache control method according to claim 13, wherein, in the resident LU deleting process, an allocation flag of the page to be deleted from the pool volume management table that is used for managing the pool volume is changed to be in the unallocated state, then, the entry of the target LU included in the address conversion table that is used for managing correspondence between the pool volume and the LU is deleted, then, the resident area is open by changing the cache residence flag of a segment in which data of the LU is maintained in the cache segment management table that is used for managing the segment in the cache memory to “not in use”, then, information of the LU included in the resident LU management table that is used for managing the list and size of the LU resident in the cache memory is deleted, and the resident LU total size and the allocatable cache size in the cache capacity management table that is used for managing the cache capacity used by the resident LU are updated, and wherein, in the residence designation releasing process, a data de-staging process for writing data restrained due to residence from the cache memory to the storage device is performed, the data in the cache memory is reflected on the storage device, then, the cache residence flag of the segment in which the data of the LU is maintained included in the cache segment management table is changed to release of residence designation, then, the information on the LU is deleted from the resident LU management table, and the resident LU total size and the allocatable cache size included in the cache capacity management table are updated.
 15. A storage apparatus comprising: a storage control device; and a storage drive device that is connected to the storage control device, wherein the storage control device includes: a host adaptor that is connected to a host computer using the storage apparatus; a central processing unit that performs overall control of the storage apparatus; a memory that stores a program or data needed by the central processing unit for controlling the storage apparatus; a cache memory that is used for having an LU, which is a logical space for data access of the host computer, to be resident; and a disk adaptor that connects the storage control device and the storage drive device, wherein the storage drive device includes a plurality of physical disks, wherein the LU that is resident in the cache memory is configured by a set of pages acquired by dividing a pool volume as a physical space created by using the plurality of physical disks in a predetermined size, and wherein, in the memory, a program that is executed by the central processing unit and is used for performing a resident LU creating process in which a resident LU is created, a program used for performing an I/O process in which an I/O request issued from the host computer is processed, and a program used for performing a resident LU deleting process in which the resident LU is deleted and a residence designation releasing process in which residence designation is released are stored, wherein, in the resident LU creating process, a direction for creating the resident LU which is issued by the host computer is received and the allocation size of the LU desired to be resident and then allocatable cache size of the cache memory are compared with each other, it is determined that the LU can be created and a process for creating the LU is performed, in a case where the allocation size of the LU is determined to be smaller than the allocable cache size as the result of comparison, and it is determined that the LU cannot be created in a case where the allocation size of the LU is determined to be larger than the allocatable cache size, wherein, in the I/O process, the I/O request issued from the host computer is received, a command of the I/O request is analyzed, and whether allocation of the page to an LBA of the LU to be processed is completed is determined based on information included in. an address conversion table, the I/O request is determined to be a request for an area in which allocation of the page is completed and a data transfer process is performed, in a case where the allocation is determined to be completed as the result of determination, and the I/O request is a request for an area in which the page is not allocated, allocation of a new page is determined to be needed, the process proceeds to a new page allocating process, and then, after the cache-residence process is performed for the newly allocated page, the data transfer process is performed, in a case where the allocation is determined not to be completed, wherein, in the cache-residence process, when the LU to be resident in the cache memory is created, a capacity corresponding to the size of the LU is not initially acquired in the cache memory, a cache capacity that is the same as the physical capacity allocated to a new page is acquired in the cache memory each time when the page is newly allocated, and the new page is resident in the cache memory, and wherein, in the resident LU deleting process and the residence designation releasing process, a command for directing to release residence which is issued from the host computer is received, whether the type of the command is deletion of the resident LU or release of residence designation is determined, the resident LU deleting process in which the page to be deleted is changed to be in the unassigned state, then, the entry of the target LU is deleted, and then, the resident area is open by changing the segment that maintains the data of the LU to be in the unused state is performed, in a case where when the type is deletion of the resident LU, and the residence designation releasing process in which the data of the cache memory is reflected on the storage device by performing a data de-staging process for the data that has been restrained due to residence, then, the segment that maintains the data of the LU is changed to release of the residence designation, and information on the LU is deleted is performed, in a case where the type is release of the residence designation. 